<template>
  <div class="header-crumb">
    <el-breadcrumb :separator-icon="'CaretRight'">
      <el-breadcrumb-item :to="item.path" v-for="item in pathBreadCrumb" :key="item.name">
        {{ item.name }}
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>

<script setup lang="ts">
import useLoginStore from '@/store/modules/login'
import { useRoute } from 'vue-router'
import { mapPathBreadCrumb } from '@/utils/map-menu'
import { computed } from 'vue'
const route = useRoute()
const loginStore = useLoginStore()
const userMenus = loginStore.userMenus
const pathBreadCrumb = computed(() => {
  return mapPathBreadCrumb(route.path, userMenus)
})

// function breadCrumbClick(route.path , userMenus) {}
</script>

<style lang="less" scoped>
.header-crumb {
}
</style>
